<template>

	<body>
		<div class="loan_nav col_nav">
			<ul>
				<li>
					<a href="javascript:history.go(-1)">
						<i class="iconfont">&#xe61e;</i>
					</a>
				</li>
				<li>
					<p>入驻申请表</p>
				</li>
				<li></li>
			</ul>
		</div>
		<div class="interval_T">

		</div>
		<div>
			<img src="@/assets/img/2e0e9be4aa926395ea893308a325e811.jpg" width="100%" />
		</div>
		<div class="application_text">
			<p>
				APP自2018年起，商家入驻项目正式启动，个人和企业中介可通过该平台实现无缝衔接，协同作业，让个人和中介在家就能操作，轻松接单或甩单。邀请心怀梦想的商家一起开疆扩土，共同打造中国最权威的金融贷款平台。
			</p>
		</div>
		<div class="application_form">
			<ul>
				<li><input v-model="params.company" type="text" placeholder="*公司名称" /></li>
				<li><input v-model="params.name" type="text" placeholder="*代理商姓名" /></li>
				<li><input v-model="params.mobile" type="text" placeholder="*联系电话" /></li>
				<!-- <li style="height:.15rem"></li> -->
				<li>
					<group>
					<x-address value-text-align="left" v-model="address" :list="addressData" @on-shadow-change="onShadowChange" title="" hide-district placeholder="*选择地址"></x-address>
					</group>
				</li>
				<!-- <li><input v-model="params.province" type="text" placeholder="*意向省份" /></li> -->
				<!-- <li><input v-model="params.city" type="text" placeholder="*意向城市" /></li> -->
				<li><input v-model="params.moneys" type="text" placeholder="*资金范围" /></li>
			</ul>
		</div>
		<div class="application_tip">
			<p>请您如实填写，我方绝不会把您的信息透露给第三方</p>
		</div>
		<!--提交按钮-->
		<div class="btn" @click="save">
			<input type="button" value="提交" class="col_dr2" />
		</div>
		<div class="interval">

		</div>
	</body>
</template>

<script>
import { Group, XAddress, ChinaAddressV4Data } from 'vux'
export default {
	components: {
		Group,
		XAddress
	},
	data() {
		return {
			addressData: ChinaAddressV4Data,
			address: [],
			params: {
				types: 1
			}
		}
	},
	methods: {
		save() {
			console.log(this.address)
			this.$http.post('/app/atApply/save', this.params).then(json => {
				const { code } = json
				if (code === 0) {
					this.$vux.toast.show({ text: '提交成功' })
					this.$router.back()
				}
			})
		},
		onShadowChange (ids, names) {
	    	if(names.length > 0){
	    		this.params.province = names[0]
	    		this.params.city = names[1]
	    	}
	    }
	}
}
</script>

<style>
.application_form .vux-popup-picker-placeholder{
	font-size:.26rem;
}
.application_form .weui-cell{
	padding:.1rem !important;
}
.application_form .weui-cells:before,.weui-cells:after{
	border:none !important;
}
.application_form .vux-cell-box{
	border:1px solid #f1f1f1;
}
.application_form .vux-cell-value{
	font-size:.26rem;
	color:#000;
}
.application_form .vux-no-group-title{
	margin-top: .15rem !important;
}
</style>